package testing;

import org.junit.Assert;
import org.junit.Test;

import performance.PerformanceResult;

public class TestingPeformance {
	@Test
	public void testPeformanceResult(){
		PerformanceResult pr = new PerformanceResult();
		changeValues(pr);
		Assert.assertEquals(pr.getTruePositives(), 1);
		Assert.assertEquals(pr.getTrueNegatives(), 1);
		Assert.assertEquals(pr.getFalsePositives(), 1);
		Assert.assertEquals(pr.getFalseNegatives(), 1);
	}
	
	public void changeValues(PerformanceResult pr){
		pr.evaluateResult(PerformanceResult.POSITIVE, PerformanceResult.POSITIVE);
		pr.evaluateResult(PerformanceResult.POSITIVE, PerformanceResult.NEGATIVE);
		pr.evaluateResult(PerformanceResult.NEGATIVE, PerformanceResult.POSITIVE);
		pr.evaluateResult(PerformanceResult.NEGATIVE, PerformanceResult.NEGATIVE);
	}
}
